home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ham Radio 2000
/
Ham Radio 2000.iso
/
ham2000
/
packet
/
pkcos2
/
pkc.doc
< prev
next >
Wrap
Text File
|
1993-12-25
|
7KB
|
193 lines
PK-232/PK-88 Control version 1.0
for OS/2 2.x
by
Peter van der Post - PE1NNH
*Important*
This software has been written for IBM OS/2 2.x. It will NOT run
under DOS or under OS/2 1.x releases. DOS users should refer to
the PKC11.ARJ archive, which contains the (old) DOS release of
the program. I have no intentions to bring the DOS version
(written in Pascal) up to date. The OS/2 version has been
written in C and is, due to the use of advanced OS/2 features,
not portable to DOS.
Files in the archive
The PKCOS2.ZIP archive should contain the following files
File Description
PKC.EXE The executable
PKC.DOC This documentation file
PKC.DAT An example parameter file
PMNOS.DAT An example parameter file
PK-232.ICO PK-232 icon
PK-88.ICO PK-88 icon
General description
PKC is a utility to control the PK-232(MBX) and PK-88
datacontrollers from Advanced Electronic Applications, Inc.
These datacontrollers are serial devices and feature digital
communications for radio hams and short wave listeners. This
program cannot be used without one of these datacontrollers.
Introduction
This program, PKC, will help you to easily change the serial
bitrate and mode of the PK-232 or PK-88. When you use different
software packages, you'll know that you are constantly changing
your datacontrollers mode and serial bitrate. Some programs can
use 9600 bps on the serial link, others have to run slower. Some
programs use the Hostmode, others the terminal (verbose) mode
and again others use the KISS mode.
PKC is able to automatically detect the current bitrate of the
datacontroller and can set it to a new bitrate and operating
mode for you. You can do this by simply starting the program and
answering the questions or you can enter your input on the
command line.
PKC supports the following bitrates: 300, 1200, 2400, 4800,
9600, 19200 bps (latter for PK-88 only). PKC can only detect the
datacontrollers bitrate out of this selection. This has been
done to speed up the program.
Using command line options
When you're sure the program runs okay on your system, you can
start using the command line options. This means that you type
the COM port number, bitrate and mode right after 'PKC' on the
OS/2 command line. The order and case of the options is not
important, but follow these rules:
Information type: Enter as: Example:
----------------- --------- --------
COM port number a single digit 2
new bitrate a number 2400
new mode a single character H
parameter file filename pkc.dat
The parameter file can be used to let PKC send additional
commands to the datacontroller, after the new bitrate has been
set. An example parameter file is included (pkc.dat). So, to put
a PK-232 or PK-88 on COM2 in 4800 bps KISS mode, you would
type:
PKC 2 4800 k
The program has the following defaults: COM1, 9600 bps, Hostmode
with no parameter file. Of course, you should at least type one
parameter after PKC to let PKC run in automatic mode.
Command file users can use the ERRORLEVEL variable to determine
if the actions of PKC were successful. PKC returns zero if
everything went okay and a nonzero value if an error occurred.
A single question mark on the command line will show the above
information, as well as the program version information.
Creating Program Objects
You can create different Program Objects in the Workplace Shell
to quickly set the PK-232 or PK-88 to an often used mode. Simply
enter the command line parameters in the Settings page.
When you create a Program Object, don't forget to copy the
icon of your controller to PKC.ICO. If you like, you can also
mark the 'Start minimized' setting on the 'Session' page of the
Program Object Settings.
New features and changes from the DOS version
-First of all, PKC no longer resets the datacontroller. This is
an advantage to people, who use the internal mailbox of the
PK-232 or PK-88. It does mean, that you are totally responsible
for the parameters of your datacontroller. (They are never
'cleaned up'.)
-PKC now also supports the PK-88. I found out that many people
where using the program already for the PK-88. The only
shortcoming was, that the 19200 bps bitrate could not be set
with PKC. That is solved in this version. Be sure, however, not
to try to put a PK-232 in that bitrate, it won't work!
-Ability to have a file with parameters sent to the
datacontroller. If you specify a filename on the command line,
the contents of that file will be transmitted to the
datacontroller, after the new operating speed has been set. This
allows you, for example, to set the HBAUD parameter for your
4800 or 9600 bps modem.
-PKC automatically adjusts to the current screen size.
Programmers information
PKC is a 32 bit, multithreaded OS/2 2.x application. When PKC is
running, a maximum of four threads are running in parallel.
You'll notice the multitasking character of the program as soon
as you enter the COM port number. At that time, the process of
finding the datacontroller is started. This process consists of
three threads. The first one opens the serial device and starts
transmitting data. The second thread reads data from the serial
device and the third scans the data for a command prompt. As
these three threads are running, the main function (the main
thread) continues by asking the user the information on the
desired operating bitrate and mode.
Programming using threads is a true delight. Sub processes can
easily be isolated in that way, making the development of a
program a lot easier. I rewrote the whole program in a few days.
This OS/2 version of PKC has been written in C, using the
Borland C++ compiler for OS/2 v1.0.
Problems
I have encountered some problems, running PKC in a window on the
desktop. Occassionally, the program will simply freeze. If you
have the same problems, run PKC in full screen mode. I think
this problem is related to the compiler, which has a few nasty
bugs itself.
PKC in the future
I have plans to write a Presentation Manager version of PKC.
This character mode version was an easy step into OS/2 C
programming, using threads and serial device API calls. The
logical step now is to get some experience in PM programming.
Revision history
931224 - Version 1.0 release of PKC as a character mode version.
Copyright notice
I release this program as freeware. Feel free to share this
utility with other hams, but please keep the original files
together.
Please send me a message if you use this program. Now that's
not too much to ask for a free program! If you have problems
with the program, please specify your configuration.
73, Peter PE1NNH @ PI8UTR.#UTR.NLD.EU